﻿const fs = require('fs');

fs.readFile('userData.txt',(err,data)=>{
    if(err){
        console.log(err);
        return;
    }
    console.log(data.toString());
});

fs.writeFile('userData.txt','username=Sherlock',err=>{
    if(err){
        console.log(err);
    }else{
        console.log('Wrote to file!');
    }
});


